VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "CAid"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Dim myconn As New ADODB.Connection

Public Function GetItemUom(ItemID As String) As String
    Dim Rst As New ADODB.Recordset
    
    Rst.Open "Select ItemUom From ItemStatic where ItemID = '" & ItemID & "'", myconn
    If Rst.BOF And Rst.EOF Then
        GetItemUom = "NoUom"
    ElseIf IsNull(Rst!ItemUom) Or Rst!ItemUom = "" Then
        GetItemUom = "NoUom"
    Else
        GetItemUom = Rst!ItemUom
    End If
    Rst.Close
End Function

Private Sub Class_Initialize()
    Dim Cn As New CMMCn
    Set myconn = Cn.Connect
    Set Cn = Nothing
End Sub
